﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Model.LogOnModel>" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>用户登录</title>
    <link href="/Content/layout-default-latest.css" rel="stylesheet" type="text/css" />
    <link href="/Content/page.css" rel="stylesheet" type="text/css" />
    <link href="/Content/sexybuttons.css" rel="stylesheet" type="text/css" />
    <script src="/Scripts/jquery-1.4.4.min.js" type="text/javascript"></script>
    <script src="/Scripts/jquery.layout.1.2.0.min.js" type="text/javascript"></script>
    <script src="/Scripts/jquery-ui.min.js" type="text/javascript"></script>
    <script src="/Scripts/jquery.validate.min.js" type="text/javascript"></script>
    <script src="/Scripts/MicrosoftAjax.js" type="text/javascript"></script>
    <script src="/Scripts/MicrosoftMvcAjax.js" type="text/javascript"></script>
    <script src="/Scripts/MicrosoftMvcValidation.js" type="text/javascript"></script>
    <script src="/Scripts/jquery.cookie.js" type="text/javascript"></script>
    <link href="/Content/Site.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        $(function () {
            $("#UserName").focus();
        });
    </script>
</head>
<body>
    <div style="width: 770px; margin: auto;">
        <div style="border-bottom: 1px solid #e4e4e4; padding: 10px;">
            <h1>
                <%:ViewData["Title"]%></h1>
        </div>
        <div style="float: left; margin: 10px;">
            <h3>
                功能简介：</h3>
            <ul style="list-style-type: decimal;">
                <li>MVC 2.0</li>
                <li>EF4.0及数据缓存</li>
                <li>jQuery UI</li>
                <li>jQuery Layout</li>
                <li>权限控制</li>
                <li>……</li>
            </ul>
            <h3>
                Why：</h3>
            <ul style="list-style-type: decimal;">
                <li>微软的东西不错，新版无论是性能还是开发效率都有很大提高</li>
                <li>……</li>
            </ul>
            <div>
                默认用户名：admin 密码：admin</div>
        </div>
        <div style="float: right; color: Black; border: 1px solid #e4e4e4; margin: 10px;
            line-height: 200%; width: 260px;">
            <div style="border-bottom: 1px solid #e4e4e4; padding: 5px 20px; background-color: #f4f4f4;">
            <b><%=Language.UserLogin %></b>   
            </div>
            <%Html.EnableClientValidation(); %>
            <% using (Html.BeginForm())
               { %>
            <%:Html.AntiForgeryToken() %>
            <div style="padding: 20px 5px 10px 5px;">
                <table>
                    <tr>
                        <th style="border: 0;">
                            <%= Html.LabelFor(m => m.UserName) %>
                        </th>
                        <td style="border: 0;">
                            <%= Html.TextBoxFor(m => m.UserName) %>
                            <%= Html.ValidationMessageFor(m => m.UserName,"*") %>
                        </td>
                    </tr>
                    <tr>
                        <th style="border: 0;">
                            <%= Html.LabelFor(m => m.Password) %>
                        </th>
                        <td style="border: 0;">
                            <%= Html.PasswordFor(m => m.Password) %>
                            <%= Html.ValidationMessageFor(m => m.Password,"*") %>
                        </td>
                    </tr>
                    <tr>
                        <th style="border: 0;">
                            <%= Html.LabelFor(m => m.lang) %>
                        </th>
                        <td style="border: 0;">
                            <select id="lang" name="lang" onchange="submit();">
                                <option></option>
                                <option value="zh-CN">中文</option>
                                <option value="en-US">English</option>
                            </select>
                        </td>
                    </tr>
                    <%if (ConfigurationManager.AppSettings["EnableAuthcode"].Equals("true"))
                      {%>
                    <tr>
                        <th style="border: 0;">
                            <%= Html.LabelFor(m => m.authcode)%>
                        </th>
                        <td style="border: 0;">
                            <%= Html.TextBoxFor(m => m.authcode, new { size = "4", maxlength = "4", style = "vertical-align:middle;" })%>
                            <img id="ImgValidateCode" alt="看不清？点击换一个" style="vertical-align: middle;" src="<%=Url.Action("SecurityCode")%>"
                                onclick="this.src=this.src+'?'" />
                            <%= Html.ValidationMessageFor(m => m.authcode, "*")%>
                        </td>
                    </tr>
                    <%}
                      else
                      {  %>
                    <tr>
                        <th style="border: 0;">
                        </th>
                        <td style="border: 0;">
                            <%= Html.HiddenFor(m => m.authcode)%>
                        </td>
                    </tr>
                    <%} %>
                    <tr>
                        <th style="border: 0;"> <%= Html.CheckBoxFor(m => m.RememberMe)%>
                        </th>
                        <td style="border: 0;">  <%= Html.LabelFor(m => m.RememberMe) %>
                        </td>
                    </tr>
                </table>
             
            </div>
            <div style="text-align: center; padding-bottom: 10px;">
                <button type="submit" class="sexybutton sexyyellow">
                    <span><span><span class="ok">登录</span></span></span></button>
                <button type="reset" class="sexybutton sexyyellow">
                    <span><span><span class="cancel">重填</span></span></span></button>
            </div>
            <div>
                <%= Html.ValidationSummary(true) %></div>
            <% } %>
        </div>
        <div style="border-top: 1px solid #e4e4e4; padding: 10px; clear: both; text-align: center;">
            <%: ViewData["Title1"]%>
        </div>
    </div>
</body>
</html>
